The present invention relates to a method for regulating the relative position of an analyte of a sample in relation to a light beam. The present invention also relates to a method for analyzing an analyte of a sample by means of a light beam. The present invention also relates to the associated sample holder and optical system.